package com.longcai.piaojia.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/8/31.
 */
@HttpInlet(Conn.USER_REG)
public class RegisterPost extends BaseAsyPost<String> {

    public String phone, user_pass, code, inviter_id;

    public RegisterPost(AsyCallBack<String> asyCallBack) {
        super(asyCallBack);
    }

    @Override
    protected String parser(JSONObject object) throws Exception {
        TOAST = object.optString("message");

        if(object.optInt("code")==200){

            JSONObject jsonObject = object.optJSONObject("data");

//            return jsonObject.optString("user_id");
            return jsonObject.optString("info");

        }

        return null;

    }
}
